# -*- coding:utf-8 -*-
class Solution:
    def jumpFloorII(self, number):
        # write code here
        # 跳台阶问题是说，按照每步跳的距离给最后一步按照距离分类，如果最后一步存在跳1和2两种情况
        # 那么就是n-1和n-2的步数和
        if number == 0:
            return 0
        if number == 1:
            return 1
        jump = [1]
        for _ in range(number-1):
            jump.append(sum(jump) + 1)
        return jump[-1]
